/*
* $Id: BQManagerDialog.h 340 2011-10-20 08:08:01Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Alexey Volokitin
* All rights reserved
*
*/
#ifndef _BQ_MANAGER_DIALOG_H_
#define _BQ_MANAGER_DIALOG_H_

class CQueenBeeManager;
class CDialogManipulationWin;

class CBQManagerDialog : public CDialog
{
public:
	enum type{
		DEFAULT = 0,
		POINT,
		FAMILY,
		QUEEN_BEE
	};
private:
	CDialogManipulationWin* m_pGLWnd;
	CDialogManipulationWin* m_pQBWnd;
	CButton m_close;
	CButton m_new;
	CButton m_delete;
	CButton m_update;
	CButton m_save;
	CButton m_cancel;
	CButton m_changeP;
	CButton m_changeF;
	CButton m_saveT;
	CButton m_cancelT;
	CTreeCtrl m_qbTree;
	CEdit m_nameBq;
private:
	type m_type;
	int m_nId;
	std::map<int, HTREEITEM> m_aItemsAll;
	std::map<int, HTREEITEM> m_aItems;
protected:
	void LoadTree();
	void ChangeSelTree();
	void ChangeSelQB(long value);
	void ChangeSelGL(long value);
protected:
	virtual void DoDataExchange(CDataExchange* pDX);
	void OnOK();
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg void OnChangeName();
	afx_msg void OnClose();
	afx_msg void OnSelChanged(NMHDR *nmhdr,LRESULT *pResult);
	afx_msg void OnNew();
	afx_msg void OnChange();
	afx_msg void OnDelete();
	afx_msg void OnCancelBQ();
	afx_msg void OnSave();
	afx_msg void OnChangeF();
	afx_msg void OnChangeP();
	afx_msg void OnCancelT();
	afx_msg void OnSaveT();
public:
	CBQManagerDialog(CWnd* pParent, type tp = DEFAULT, int nId = 0);
	virtual ~CBQManagerDialog();
public:
	virtual BOOL OnInitDialog();
};

#endif/*_BQ_MANAGER_DIALOG_H_*/